﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WebTranslator;

namespace TranslationClient
{
  public partial class Rejestracja : Form
  {
      CMSProtocolC clientProtocol;
    public Rejestracja(CMSProtocolC clientProtocol)
    {
      InitializeComponent();
      this.clientProtocol = clientProtocol;
    }

      private void buttonZarejestruj_Click(object sender, EventArgs e)
      {
          string login = textBoxLogin.Text;
          string pass1 =  textBoxPass1.Text, pass2 = textBoxPass2.Text;
          if(!String.IsNullOrEmpty(login) && pass1==pass2 && !String.IsNullOrEmpty(pass1)){
              clientProtocol.Send("rejestracja " + login + " " + pass1);
              MessageBox.Show(clientProtocol.Receive());
          }
      }
  }
}
